
<%@page import="com.mysql.fabric.xmlrpc.base.Data"%>
<%@ page language="java" contentType="text/html; charset=UTF-8"
    pageEncoding="UTF-8"%>
  <%@ page import="fy.bean.*,java.util.*,java.io.*" %>  
<%
request.setCharacterEncoding("utf-8");
String title = request.getParameter("title");
String content = request.getParameter("data");
String category = request.getParameter("category");
String puton = request.getParameter("puton");
String author = request.getParameter("author");
String attachment = request.getParameter("attachment");
String txtDate = request.getParameter("txtDate");

System.out.print("doadd.jsp : +category :"+category +"+puton :"+puton
		  +"+author :"+author+"+title :"+title+"attachment :"+attachment);
		System.out.println("content" + content);
Ssfwzx ssfw = new Ssfwzx();

if(ssfw.doAdd(category, title, content, author, puton,attachment,txtDate)){
	response.sendRedirect("../content.jsp");
}else{
	response.setCharacterEncoding("utf-8");
	PrintWriter pout = response.getWriter();
	pout.print("<script>alert('增加失败'); window.location='../content.jsp' </script>");
	pout.flush();
	pout.close();
	//response.sendRedirect("login.html");
};

%>    
